{template 'common/header'}
{template 'site/nav_menu'}
<style>
.table td span{display:inline-block;margin-top:4px;}
.table td input{margin-bottom:0;}
</style>
<form action="" method="post">
<div class="main">
	<div style="padding:15px;">
		<table class="table table-hover">
			<thead class="navbar-inner">
				<tr>
					<th style="width:30px;"></th>
					<th style="width:60px;">排序</th>
					<th style="width:45px;">图标</th>
					<th style="width:100px;">名称</th>
					<th style="width:60px;">位置</th>
					<th style="width:60px;">类型</th>
					<th style="width:200px;">链接</th>
					<th style="min-width:60px;">操作</th>
				</tr>
			</thead>
			<tbody>
				{loop $navs $item}
				<tr>
					<td><input type="checkbox" name="status[{$item['id']}]" value="1" {if $item['status']} checked{/if} /></td>
					<td><input type="text" class="span1" name="displayorder[{$item['id']}]" value="{$item['displayorder']}" /></td>
					<td>{if $item['css']['icon']['icon'] && empty($item['icon'])}<i class="{$item['css']['icon']['icon']} icon-2x"></i>{else}{if $item['icon']}<img src="{$_W['attachurl']}{$item['icon']}" width="30" />{/if}{/if}</td>
					<td><input type="text" class="span3" name="name[{$item['id']}]" value="{$item['name']}" /></td>
					<td><span>{$position[$item['position']]}</span></td>
					<td><span>{if $item['issystem']}内置{else}自定义{/if}</span></td>
					<td><span>{$item['url']}</span></td>
					<td><span><a href="{php echo create_url('site/nav/post', array('id' => $item['id']))}">编辑</a>&nbsp;<a onclick="return confirm('此操作不可恢复，确定删除吗？');return false;" href="{php echo create_url('site/nav/delete', array('id' => $item['id']))}">删除</a></span></td>
				</tr>
				{/loop}
			</tbody>
			<tr>
				<th></th>
				<td>
					<input name="token" type="hidden" value="{$_W['token']}" />
					<input type="submit" class="btn btn-primary" name="submit" value="提交" />
				</td>
			</tr>
		</table>
	</div>
</div>
</form>
{template 'common/footer'}